let data = {
    list: [
        {
            "roleId": "1",
            "roleName": "管理员",
            "isStatus": "0",
            "createName": "tom",
            "updateName": "tom",
            "createTime": "2022-01-2 17:30:00",
            "updateTime": "2022-01-2 17:30:00",
            "id": "1",
            menuIds:['11']
        },
        {
            "roleId": "2",
            "roleName": "学生",
            "isStatus": "0",
            "createName": "tom",
            "updateName": "tom",
            "createTime": "2022-01-2 17:30:00",
            "updateTime": "2022-01-2 17:30:00",
            "id": "2",
            menuIds:['12']
        },
        {
            "roleId": "3",
            "roleName": "老师",
            "isStatus": "1",
            "createName": "tom",
            "updateName": "tom",
            "createTime": "2022-01-2 17:30:00",
            "updateTime": "2022-01-2 17:30:00",
            "id": "3",
            menuIds:['1','11','12']
            
        },
    ]
};

module.exports = [
    //角色列表
    {
        url: "/system/role/getRoleList",
        type: "post",
        response: config => {
            //参数  config.body
            const { pageIndex = 1, pageSize = 10 } = config.body;
            data.pageIndex = pageIndex;
            data.pageSize = pageSize;
            return {
                statusCode: 200,
                data: data,
                msg: "OK"
            };
        }
    },

    //添加角色
    {
        url: "/system/role/addRole",
        type: "post",
        response: config => {
            //参数  config.body
            const roles = config.body.roles;
            console.log('add',roles);
            return {
                statusCode: "200",
                msg: "成功",
                data: []
            };
        }
    },

    //更新角色
    {
        url: "/system/role/updateRole",
        type: "post",
        response: config => {
            //参数  config.body
            const roles = config.body.roles;
            console.log('update',roles);
            return {
                statusCode: "200",
                msg: "成功",
                data: []
            };
        }
    },


    //删除角色
    {
        url: "/system/role/deleteRole",
        type: "post",
        response: config => {
            //参数  config.body
            const id = config.body.id;
            console.log('del',id);
            return {
                statusCode: "200",
                msg: "成功",
                data: []
            };
        }
    }
];
